package com.hp.it.sonar.enumeration;

public class Period {

	public static String idToString(int i) {
		String ret = "";
		switch (i) {
		case 1:
			ret = "SINCEPREVIOUS";
		case 2:
			ret = "WEEK";
		case 3:
			ret = "MONTH";
		}
		return ret;
	}

	public static int StringToId(String period) {
		if ("SINCEPREVIOUS".equalsIgnoreCase(period)) {
			return 1;
		} else if ("WEEK".equalsIgnoreCase(period)) {
			return 2;
		} else if ("MONTH".equalsIgnoreCase(period)) {
			return 3;
		}
		return 0;
	}
}
